#ifndef __CC_SEM__
#define __CC_SEM__
#include "cc_portable.h"

cc_sem_t cc_sem_create(int init, int max);
void cc_sem_init(cc_sem_t sem, uint32_t init, uint32_t max);
int cc_sem_release(cc_sem_t sem);
int cc_sem_wait(cc_sem_t sem);
int cc_sem_try_wait(cc_sem_t sem);
int cc_sem_wait_time(cc_sem_t sem, uint32_t ms);
int cc_sem_get_cnt(cc_sem_t sem);
void cc_sem_deinit(cc_sem_t sem);
void cc_sem_destory(cc_sem_t sem);

#endif